// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// 	http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//! Autogenerated weights for `pallet_election_provider_multi_block::signed`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-11-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `dc396778ddb0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024

// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm
// --pallet=pallet_election_provider_multi_block::signed
// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;

/// Weight functions for `pallet_election_provider_multi_block::signed`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_election_provider_multi_block::signed::WeightInfo for WeightInfo<T> {
	/// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0)
	/// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0)
	/// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`)
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:0 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`)
	fn register_not_full() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `3252`
		//  Estimated: `6717`
		// Minimum execution time: 85_153_000 picoseconds.
		Weight::from_parts(87_582_000, 0)
			.saturating_add(Weight::from_parts(0, 6717))
			.saturating_add(T::DbWeight::get().reads(5))
			.saturating_add(T::DbWeight::get().writes(3))
	}
	/// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0)
	/// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0)
	/// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`)
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `Balances::Holds` (r:2 w:2)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:2)
	/// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32)
	/// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`)
	fn register_eject() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `7851`
		//  Estimated: `88041`
		// Minimum execution time: 230_285_000 picoseconds.
		Weight::from_parts(237_361_000, 0)
			.saturating_add(Weight::from_parts(0, 88041))
			.saturating_add(T::DbWeight::get().reads(39))
			.saturating_add(T::DbWeight::get().writes(37))
	}
	/// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0)
	/// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0)
	/// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:0)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`)
	fn submit_page() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `3785`
		//  Estimated: `7250`
		// Minimum execution time: 177_318_000 picoseconds.
		Weight::from_parts(196_911_000, 0)
			.saturating_add(Weight::from_parts(0, 7250))
			.saturating_add(T::DbWeight::get().reads(7))
			.saturating_add(T::DbWeight::get().writes(3))
	}
	/// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0)
	/// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0)
	/// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:0)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`)
	fn unset_page() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `3887`
		//  Estimated: `7352`
		// Minimum execution time: 164_593_000 picoseconds.
		Weight::from_parts(207_127_000, 0)
			.saturating_add(Weight::from_parts(0, 7352))
			.saturating_add(T::DbWeight::get().reads(7))
			.saturating_add(T::DbWeight::get().writes(3))
	}
	/// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0)
	/// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32)
	/// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`)
	fn bail() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `4717`
		//  Estimated: `84907`
		// Minimum execution time: 141_746_000 picoseconds.
		Weight::from_parts(146_143_000, 0)
			.saturating_add(Weight::from_parts(0, 84907))
			.saturating_add(T::DbWeight::get().reads(37))
			.saturating_add(T::DbWeight::get().writes(35))
	}
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32)
	/// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0)
	/// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`)
	/// The range of component `p` is `[1, 32]`.
	fn clear_old_round_data(p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `3709 + p * (32 ±0)`
		//  Estimated: `7174 + p * (2507 ±0)`
		// Minimum execution time: 86_306_000 picoseconds.
		Weight::from_parts(88_268_158, 0)
			.saturating_add(Weight::from_parts(0, 7174))
			// Standard Error: 7_479
			.saturating_add(Weight::from_parts(1_129_962, 0).saturating_mul(p.into()))
			.saturating_add(T::DbWeight::get().reads(5))
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
			.saturating_add(T::DbWeight::get().writes(3))
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
			.saturating_add(Weight::from_parts(0, 2507).saturating_mul(p.into()))
	}
}
